package com.engine4cloud.tdf.admin.api.feign;

import com.engine4cloud.tdf.admin.api.dto.AreaQueryDTO;
import com.engine4cloud.tdf.admin.api.vo.AreaResultVO;
import com.engine4cloud.tdf.common.core.constant.SecurityConstants;
import com.engine4cloud.tdf.common.core.constant.ServiceNameConstants;
import com.engine4cloud.tdf.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @author tdf
 * @date 2024/4/17
 * <p>
 * 行政区划接口
 */
@FeignClient(contextId = "remoteAreaService", value = ServiceNameConstants.SYS_SERVICE)
public interface RemoteAreaService {

    /**
     * 通过code和areaId查询行政区划
     *
     * @param from 内部标志
     * @return R<AreaResultVO>
     */
    @PostMapping("/sysArea/detail")
    R<AreaResultVO> getAreaDetail(@RequestBody AreaQueryDTO dto, @RequestHeader(SecurityConstants.FROM) String from);

}
